<!DOCTYPE html>
<html lang="en" class="no-js">
	<head>
		<link rel="stylesheet" type="text/css" href="css/dialog.css" />
		<link rel="stylesheet" type="text/css" href="css/dialog-alex.css" />
		<script src="js/modernizr.custom.js"></script>
	</head>
	<body>
		<div class="container">
			<div class="content">
				<header class="codrops-header">
					<div class="button-wrap"><button data-dialog="somedialog" class="trigger">Open Dialog</button></div>
				</header>


                                                        <div class="alertstr">
                                                                <div id="somedialog" class="dialog">
                                                                <div class="dialog__overlay"></div>
                                                                <div class="dialog__content">
                                                                    <h2> C($config); //如果C方法的第一个参数传入数组，就表示批量赋值，上面的赋值相当于：</h2><div><button class="action" data-dialog-close>关闭</button></div>
                                                                </div>
                                                            </div>
                                                        </div>
			</div><!-- /content -->
		</div><!-- /container -->
		<script src="js/classie.js"></script>
		<script src="js/dialogFx.js"></script>
		<script>
			(function() {
                                                        var alertstr = document.getElementsByClassName('alertstr')[0];
				var dlgtrigger = document.querySelector( '[data-dialog]' ),
				somedialog = document.getElementById( dlgtrigger.getAttribute( 'data-dialog' ) ),
				dlg = new DialogFx( somedialog );
                                                        if (true) {
				dlgtrigger.addEventListener( 'click', dlg.toggle.bind(dlg) );
                                                        }

			})();
		</script>
	</body>
</html>
